package com.h3c.nem.task;


import com.h3c.nem.service.ITbTrainWorkerService;


import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.IJobHandler;
import com.xxl.job.core.handler.annotation.JobHandler;
import com.xxl.job.core.log.XxlJobLogger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;



@JobHandler(value="closeOneMailTodoTaskJobHandler")
@Component
public class CloseOneMailTodoTaskJobHandler extends IJobHandler {

    @Autowired
    private ITbTrainWorkerService tbTrainWorkerService;

    @Override
    public ReturnT<String> execute(String param) throws Exception {
        XxlJobLogger.log("XXL-JOB, closeOneMailTodoTaskJobHandler.");
        try {
            tbTrainWorkerService.closeTimeOverTodoTask();
        }catch (Exception e){
            e.printStackTrace();
            XxlJobLogger.log(e.getMessage());
            return FAIL;
        }
        return SUCCESS;
    }



}
